﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ArtsShop.BusinessLogic;

namespace ArtsShop
{
    public partial class ProductDetails : System.Web.UI.Page
    {
        int productId = -1; //default category id

        protected void Page_Load(object sender, EventArgs e)
        {
            string prodIDStr = Request.QueryString["productId"];



            if (prodIDStr != null)
            {
                Int32.TryParse(prodIDStr, out productId);
            }
            this.FormView_Product.DataKeyNames = new string[1] { "productId" };
            this.FormView_Product.DataSource = Product.GetProductById(productId);
            this.FormView_Product.DataBind();
        }
    }
}
